<template>
  <a-card>
    <s-table
      ref="table"
      rowKey="id"
      :data="loadData"
      size="default"
      :showPagination="true"
      :pagination="{ current: page, pageSize: limit, total }"
    >
      <a-table-column title="角色名称" dataIndex="name" key="name" />
    </s-table>
  </a-card>
</template>

<script>
import { STable } from '@/components'
import { getRoleList } from '@/api/auth'

export default {
  name: 'Role',
  data() {
    return {
      page: 1,
      limit: 10,
      total: 0,
      queryParam: {},
      loadData: parameter => {
        console.log('parameter', parameter)
        return getRoleList(Object.assign(parameter, this.queryParam)).then(res => {
          return res
        })
      }
    }
  },
  components: {
    STable
  }
}
</script>

<style scoped></style>
